{include file="$temps.head" title="$webs.title" /}
<section class="layout">
    {cxbs:contlist name="Advertising" map="'id','7'"  listdb="in_listdb" unsz="cont" }
    <div class="layout">
        <div class="layui-carousel in-huandeng" id="articlelb">
            <div carousel-item>
                {volist name="in_listdb" id="cx" empty=""}
                {volist name="cx.cont" id="c" empty=""}
                <div class="wx-hdp img-auto">
                    <a href="{$c.url}" class="zoomImages" style="background-image: url('{:imgeditadd($c.img,false)}')" data-transition="slide"></a>
                </div>
                {/volist}
                {/volist}
            </div>
        </div>
    </div>
    {/cxbs:contlist}
</section>
<section class="layout cx-fex-c mt-10">
    <div class="x11">
    <a class="layout in-sok t-gray t-c pad-a5 bg-fff" href="{:url('Search/index')}"><i class="cx-icon cx-icon-sousuo"> 搜索</i></a>
    </div>
</section>
{cxbs:tuangoulist name="tuangou" nums="4" listdb="tg_listdb" pinclass="0元团"}
<section class="layout cx-fex-c">
    <div class="xl11 cx-fex in-new-title">
        <h3 class="t-red"><span class="in-newk-th mr-10 bg-red"></span>0元拼团</h3>
        <a class="t-12" href="{:url('Part/index',array('fid'=>'4'))}">更多<i class="cx-icon cx-icon-xiangyoujiantou"></i></a>
    </div>
    <ul class="layout cx-fex-l">
        {volist name="tg_listdb" id="cx" empty=""}
        <li class="xl6 fex-column in-tuangou-lik pad-a5">
            <a class="layout" href="{:url('Article/index',array('aid'=>$cx.aid))}">
            <div class="layout bg-fff">
                <div class="layout in-tuangou-imgl pos-r">
                    {neq name="cx.pinimg" value="0"}
                    <div class="img-auto in-tuangou-imgk pos-a">
                        <div class="zoomImages" style="background-image: url('{$cx.pinimg}')"></div>
                    </div>
                    {else /}
                    <div class="img-auto in-tuangou-imgk pos-a">
                        <div class="zoomImages" style="background-image: url('{$cx.picurl}')"></div>
                    </div>
                    {/neq}
                </div>
                <div class="layout pad-a5 fex-column in-tuangou-content">
                    <h3 class="t-14">{:get_word($cx.title,20)}</h3>
                    <div class="dtimes t-12 t-gray" data-times="{$cx.jietims}"><i class="cx-icon cx-icon-shijian mr-5"></i><span></span></div>
                    <div class="t-gray">
                        <div class="layui-progress">
                            <div class="layui-progress-bar layui-bg-red" lay-percent="{$cx['addnum'] / $cx['rennum']*100}%"></div>
                        </div>
                        <span class="t-red t-12">{$cx['addnum']}</span> 人已报名
                    </div>
                    <div class="in-tuangou-jia cx-fex">
                        <div class="t-14 t-gray" style="text-decoration:line-through"><i class="cx-icon cx-icon-renminbi1688"></i> {$cx.shichangjia}</div>
                        <div class="in-tuangou-jiah t-14 t-red"><i class="cx-icon cx-icon-renminbi1688"></i> <span class="t-18">{$cx.pinmoney}</span></div>
                    </div>
                    <div class="pad-b10 cx-fex-c">
                        {eq name="$cx.addnum" value="$cx.rennum"}
                        <span class="button button-S">已满团</span>
                        {else /}
                        <span class="button button-S bg-yellow">马上报名</span>
                        {/eq}
                    </div>
                </div>
            </div>
            </a>
        </li>
        {/volist}
    </ul>
</section>
{/cxbs:tuangoulist}
{cxbs:tuangoulist name="tuangou" nums="4" listdb="tg_listdb" pinclass="正常团"}
<section class="layout cx-fex-c">
    <div class="xl11 cx-fex in-new-title">
        <h3 class="t-red"><span class="in-newk-th mr-10 bg-red"></span>最新团购</h3>
        <a class="t-12" href="{:url('Part/index',array('fid'=>'3'))}">更多<i class="cx-icon cx-icon-xiangyoujiantou"></i></a>
    </div>
    <ul class="layout cx-fex-l">
        {volist name="tg_listdb" id="cx" empty=""}
        <li class="xl6 fex-column in-tuangou-lik pad-a5">
            <a class="layout" href="{:url('Article/index',array('aid'=>$cx.aid))}">
            <div class="layout bg-fff">
                <div class="layout in-tuangou-imgl pos-r">
                    {neq name="cx.pinimg" value="0"}
                    <div class="img-auto in-tuangou-imgk pos-a">
                        <div class="zoomImages" style="background-image: url('{$cx.pinimg}')"></div>
                    </div>
                    {else /}
                    <div class="img-auto in-tuangou-imgk pos-a">
                        <div class="zoomImages" style="background-image: url('{$cx.picurl}')"></div>
                    </div>
                    {/neq}
                </div>
                <div class="layout pad-a5 fex-column in-tuangou-content">
                    <h3 class="t-14">{:get_word($cx.title,20)}</h3>
                    <div class="dtimes t-12 t-gray" data-times="{$cx.jietims}"><i class="cx-icon cx-icon-shijian mr-5"></i><span></span></div>
                    <div class="t-gray">
                        <div class="layui-progress">
                            <div class="layui-progress-bar layui-bg-red" lay-percent="{$cx['addnum'] / $cx['rennum']*100}%"></div>
                        </div>
                        <span class="t-red t-12">{$cx['addnum']}</span> 人已付款
                    </div>
                    <div class="in-tuangou-jia cx-fex">
                        <div class="t-14 t-gray" style="text-decoration:line-through"><i class="cx-icon cx-icon-renminbi1688"></i> {$cx.shichangjia}</div>
                        <div class="in-tuangou-jiah t-14 t-red">
                            <i class="cx-icon cx-icon-renminbi1688"></i>
                            <span class="t-18">{$cx.pinmoney}</span>
                        </div>
                    </div>
                    <div class="pad-b10 cx-fex-c">
                        {eq name="$cx.addnum" value="$cx.rennum"}
                        <span class="button button-S">已满团</span>
                        {else /}
                        <span class="button button-S bg-yellow">马上参团</span>
                        {/eq}
                    </div>
                </div>
            </div>
            </a>
        </li>
        {/volist}
    </ul>
</section>
{/cxbs:tuangoulist}
{cxbs:artilist name="inshop" map="array('fid'=>2)" mid="100" listdb="in_shop"}
<section class="layout cx-fex-c">
    <div class="xl11 cx-fex in-new-title">
        <h3 class="t-red"><span class="in-newk-th mr-10 bg-red"></span>今日热推</h3>
        <a class="t-12" href="{:url('Part/index',array('fid'=>'3'))}">更多<i class="cx-icon cx-icon-xiangyoujiantou"></i></a>
    </div>
    <ul class="layout cx-fex-l">
        {volist name="in_shop" id="cx" empty=""}
        <li class="xl6 fex-column in-tuangou-lik pad-a5">
            <a class="layout" href="{:url('Article/index',array('aid'=>$cx.aid))}">
            <div class="layout bg-fff">
                <div class="layout in-tuangou-imgl pos-r">
                    <div class="img-auto in-tuangou-imgk pos-a">
                        <div class="zoomImages" style="background-image: url('{$cx.picurl}')"></div>
                    </div>
                </div>
                <div class="layout pad-a5 fex-column">
                    <h3 class="t-14 in-goumai-t">{:get_word($cx.title,20)}</h3>
                    <div class="layout pad-t10 pad-b10 cx-fex">
                        <div class="cx-fex fex-column">
                            <div class="t-14 t-gray" style="text-decoration:line-through"><i class="cx-icon cx-icon-renminbi1688"></i> {$cx.shichuangjia}</div>
                            <div class="in-tuangou-jiah t-14 t-red">
                                <i class="cx-icon cx-icon-renminbi1688"></i>
                                <span class="t-18">
                                {switch name="$cxbsuser.group_id" }
                                {case value="5"}{$cx.shichuangjia}{/case}
                                {case value="6"}{$cx.yinjia}{/case}
                                {case value="7"}{$cx.jinjia}{/case}
                                {case value="8"}{$cx.pifajia}{/case}
                                {default /}
                                {$cx.shichuangjia}
                                {/switch}
                                </span>
                            </div>
                        </div>
                        <div class="cx-fex fex-column">
                            <div class="t-gray mb-5"><span class="t-red t-12">{:get_count('Order',array('aid'=>$cx.aid))}</span> 人已付款</div>
                            <span class="button button-S bg-yellow">立即购买</span>
                        </div>
                    </div>
                </div>
            </div>
            </a>
        </li>
        {/volist}
    </ul>
</section>
{/cxbs:artilist}
<div style="width:100%;height: 70px"></div>

<script>
    $(document).ready(function() {
        $("#zznav").show();
        $('.dtimes').each(function () {
            var d = $(this);
            var t = d.data();
            layui.use('util', function () {
                var layutil = layui.util;
                var serverTime = new Date().getTime(),
                    ktime = t.times * 1000;
                layutil.countdown(ktime, serverTime, function (date, serverTime, timer) {
                    var str = date[0] + '天' + date[1] + '时' + date[2] + '分' + date[3] + '秒';
                    $(d).find('span').text('仅剩：' + str);
                });
            });
        });
        layui.use('element', function () {
            var element = layui.element;
        });
    })
</script>

{include file="$temps.foot" /}
